#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int max(int len1, int len2)
{
	if (len1 >= len2)
	{
		return len1;
	}
	else
	{
		return len2;
	}
	return 0;
}
void fanzhuan(char a[1000], int len)
{
	for (int i = 0, j = len - 1; i < j; i++, j--)
	{
		int t = a[i];
		a[i] = a[j];
		a[j] = t;
	}
}
void add(char a[1000], char b[1000],char c[1000],int len1,int len2)
{
	for (int i = 0; i < len1; i++)
	{
		a[i] -= '0';
	}
	for (int i = 0; i < len2; i++)
	{
		b[i] -= '0';
	}
	int len = max(len1, len2);
	for (int i = 0; i < len; i++)
	{
		c[i] += a[i] + b[i];
		if (c[i] >= 10)
		{
			c[i + 1] = c[i] / 10;
			c[i] = c[i] % 10;
		}
	}
	if (c[len] != 0)
	{
		len++;
	}
	for(int i = len-1; i >= 0; i--)
	{
		printf("%d", c[i]);
	}
}

int main()
{
	char a[1000] = { 0 };
	char b[1000] = { 0 };
    char c[1000] = { 0 };
	scanf("%s %s", a,b);
	int len1 = strlen(a);
	int len2 = strlen(b);
	fanzhuan(a,len1);
	fanzhuan(b,len2);
	add(a,b,c,len1,len2);
	return 0;
}